/**   
 * @Title: UserInfo.java 
 * @Package com.esun.rabbit2 
 * @Description: (用户基本信息) 
 * @author City Jiangsy@500wan.com   
 * @date 2011-6-7 下午01:54:31  
 * copy right 深圳市易讯天空网络技术有限公司
 */
package com.esun.model;

import com.esun.config.Config;

/**
 * <p>
 * 此类在程序启动时创建
 * </p>
 * <p>
 * 它的对象为静态，在整个会话中保存用户的基本信息
 * </p>
 * 
 * @ClassName: UserInfo
 * @Description: (保存用户基本信息)
 * @author City Jiangsy@500wan.com
 * @date 2011-6-7 下午01:54:31
 * 
 */
public class UserInfo {

	private static UserInfo userInfo = null;

	public static UserInfo getUserInfo() {
		if (userInfo == null) {
			return userInfo = new UserInfo();
		} else {
			return userInfo;
		}
	}

	// 用户名
	private String userName = "";

	// 用户密码
	private String userPwd = "";

	// session ID
	private String userSession = "";

	// 用户账户余额
	private String userBalance = "0";

	// 记住密码
	private boolean isSavePassWord = false;

	// 自动登录
	private boolean isAutoLogin = false;

	// 冻结金额
	private String userFreeze = "";

	// 是否保存用户信息
	private boolean isSaveData;

	/** 2011-07-04 15:55 Miko 加入 **/
	// 真实姓名
	private String realName = "";

	// 手机号码
	private String mobile = "";

	// 身份证号
	private String idNum = "";

	// 固定电话
	private String phoneNum = "";

	// 电子邮箱
	private String eMail = "";

	// QQ号码
	private String qq = "";

	// 头像名称
	private String avatarAdd = "";

	// 登录成功时间
	private long inputPasswordTime;

	// 网络状态
	private boolean isNetWork;

	// 是否开启15分钟输入密码账号保护true=开启，false=关闭
	private boolean accountProtectState = true;

	// 购彩中的充值操作 ,是否为购彩中的充值操作
	private boolean isBuyingRecharge;

	// 继续购买操作,是否为继续购买
	private boolean isRebuy = false;

	// 当前版本号
	private String currentVersion = "";

	// 用户mac地址
	private String wlanMac = Config.NULLMARK;

	// push唯一吗
	private String push_serial = Config.NULLMARK;

	// 是否首次激活
	private String isFirstActivite = Config.NUM0;

	public String getIsFirstActivite() {
		return isFirstActivite;
	}

	public void setIsFirstActivite(String isFirstActivite) {
		this.isFirstActivite = isFirstActivite;
	}

	public String getPush_serial() {
		return push_serial;
	}

	public void setPush_serial(String push_serial) {
		this.push_serial = push_serial;
	}

	public boolean isAutoLogin() {
		return isAutoLogin;
	}

	public void setAutoLogin(boolean isAutoLogin) {
		this.isAutoLogin = isAutoLogin;
	}

	public boolean isSavePassWord() {
		return isSavePassWord;
	}

	public void setSavePassWord(boolean isSavePassWord) {
		this.isSavePassWord = isSavePassWord;
	}

	/**
	 * @return the wlanMac
	 */
	public String getWlanMac() {
		return wlanMac;
	}

	/**
	 * @param wlanMac
	 *            the wlanMac to set
	 */
	public void setWlanMac(String wlanMac) {
		this.wlanMac = wlanMac;
	}

	/**
	 * @return the isRebuy
	 */
	public boolean isRebuy() {
		return isRebuy;
	}

	/**
	 * @param isRebuy
	 *            the isRebuy to set
	 */
	public void setRebuy(boolean isRebuy) {
		this.isRebuy = isRebuy;
	}

	public boolean isBuyingRecharge() {
		return isBuyingRecharge;
	}

	public void setBuyingRecharge(boolean isBuyingRecharge) {
		this.isBuyingRecharge = isBuyingRecharge;
	}

	// 购彩中的充值操作 ,是否为购彩中的充值操作
	private boolean isRechargeSucceed;

	public boolean isRechargeSucceed() {
		return isRechargeSucceed;
	}

	public void setRechargeSucceed(boolean isRechargeSucceed) {
		this.isRechargeSucceed = isRechargeSucceed;
	}

	public String getCurrentVersion() {
		return currentVersion;
	}

	public void setCurrentVersion(String version) {
		this.currentVersion = version;
	}

	public void setAccountProtectState(Boolean isOpen) {
		this.accountProtectState = isOpen;
	}

	public boolean getAccountProtectState() {
		return accountProtectState;
	}

	public void setNetWork(boolean isconnected) {
		this.isNetWork = isconnected;
	}

	public boolean getNetWork() {
		return this.isNetWork;
	}

	public void setInputPasswordTime() {
		this.inputPasswordTime = System.currentTimeMillis();
	}

	public void setResetInputPasswordTime() {
		this.inputPasswordTime = -900000;
	}

	public long getInputPasswordTime() {
		return inputPasswordTime;
	}

	public String getUserName() {
		return userName;
	}

	public void setUserName(String userName) {
		this.userName = userName;
	}

	public String getUserPwd() {
		return userPwd;
	}

	public void setUserPwd(String userPwd) {
		this.userPwd = userPwd;
	}

	public String getUserSession() {
		return userSession;
	}

	public void setUserSession(String userSession) {
		this.userSession = userSession;
	}

	public String getUserBalance() {
		return userBalance;
	}

	public void setUserBalance(String userBalance) {
		this.userBalance = userBalance;
	}

	public String getUserFreeze() {
		return userFreeze;
	}

	public void setUserFreeze(String userFreeze) {
		this.userFreeze = userFreeze;
	}

	public boolean isSaveData() {
		return isSaveData;
	}

	public void setSaveData(boolean isSaveData) {
		this.isSaveData = isSaveData;
	}

	public String getRealName() {
		return realName;
	}

	public void setRealName(String realName) {
		this.realName = realName;
	}

	public String getMobile() {
		return mobile;
	}

	public void setMobile(String mobile) {
		this.mobile = mobile;
	}

	public String getIdNum() {
		return idNum;
	}

	public void setIdNum(String idNum) {
		this.idNum = idNum;
	}

	public String getPhoneNum() {
		return phoneNum;
	}

	public void setPhoneNum(String phoneNum) {
		this.phoneNum = phoneNum;
	}

	public String geteMail() {
		return eMail;
	}

	public void seteMail(String eMail) {
		this.eMail = eMail;
	}

	public String getQq() {
		return qq;
	}

	public void setQq(String qq) {
		this.qq = qq;
	}

	public String getAvatarAdd() {
		return avatarAdd;
	}

	public void setAvatarAdd(String avatarAdd) {
		this.avatarAdd = avatarAdd;
	}

}
